import java.util.*;

import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.FileOutConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import com.baomidou.mybatisplus.generator.config.TemplateConfig;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sdry.InfoSdryApplication;
import com.sdry.project.entity.GenTd12Entity;
import com.sdry.project.service.GenTd12Service;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @Description 代码生成器
 * @Author chenBin
 * @Date 2020-08-05 16:16
 * @Version 1.0
 **/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = InfoSdryApplication.class)
public class CodeGenerator {

    @Autowired
    private GenTd12Service genTd12Service;

    @Test
    public void test() {
        Page<Object> objects = PageHelper.startPage(1, 10);
        List<GenTd12Entity> list = genTd12Service.list();
        //PageInfo<GenTd12Entity> page = new PageInfo<GenTd12Entity>(list);
        System.out.println("---------------"+objects.getTotal());
        //System.out.println("==============="+page.getSize());
    }
}
